Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update ext/oci8 methodsynopses based on stubs #601

Merged
merged 8 commits into from
Sep 23, 2021

Conversation

kocsismate
Copy link
Member

No description provided.

Copy link
Member

@Girgias Girgias left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks mostly good to me other than a couple of changes, but I haven't really followed all the stub changes discussions.

reference/oci8/OCI-Lob/close.xml Show resolved Hide resolved
reference/oci8/functions/oci-bind-by-name.xml Outdated Show resolved Hide resolved
reference/oci8/functions/oci-close.xml Show resolved Hide resolved
reference/oci8/functions/oci-fetch-object.xml Outdated Show resolved Hide resolved
reference/oci8/functions/oci-password-change.xml Outdated Show resolved Hide resolved
@kocsismate kocsismate requested a review from Girgias June 18, 2021 13:50
@kocsismate
Copy link
Member Author

@Girgias Can you please take another look?

Copy link
Member

@cmb69 cmb69 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

From a cursory look, this seems to be okay. I don't have any experience with OCI, and I don't have the time to check PHP 7 implementation regarding potential changes. Maybe @cjbj wants to have look?

@cjbj
Copy link
Contributor

cjbj commented Aug 20, 2021

Gotta love the PHP community for being active on this! Thanks all.

Visually it seemed OK but my long-working build command php ../doc-base/configure.php && phd -o mydocs -f xhtml -P PHP -p book.oci8 -d ../doc-base/.manual.xml failed with

ERROR (/Users/cjones/p/phpdoc/doc-base/manual.xml:487:0)
End:
^
 XPointer evaluation failed: #xmlns(db=http://docbook.org/ns/docbook)
 xpointer(id('ingres.configuration.list')/*)

ERROR (/Users/cjones/p/phpdoc/doc-base/manual.xml:unknown)
 XPointer evaluation failed: #xmlns(db=http://docbook.org/ns/docbook)
 xpointer(id('mongo.configuration.list')/*)
failed.

The document didn't validate, here are the errors I got:
(If this isn't enough information, try again with --enable-xml-details)
 IDREF attribute linkend references an unknown ID "book.filepro"
 IDREF attribute linkend references an unknown ID "book.filepro"
 IDREF attribute linkend references an unknown ID "book.filepro"
[... and a bunch more]

Hints anyone?

@cmb69
Copy link
Member

cmb69 commented Aug 20, 2021

@cjbj, I think you need to rebase this PR onto HEAD of master (also update doc-base and phd if not already done).

Copy link
Contributor

@cjbj cjbj left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@cjbj, I think you need to rebase this PR onto HEAD of master (also update doc-base and phd if not already done).

Good call.

reference/oci8/OCI-Collection/getElem.xml Show resolved Hide resolved
reference/oci8/OCI-Collection/append.xml Show resolved Hide resolved
@@ -9,7 +9,7 @@
<refsect1 role="description">
&reftitle.description;
<methodsynopsis role="oop">
<type>bool</type><methodname>OCICollection::assign</methodname>
<modifier>public</modifier> <type>bool</type><methodname>OCICollection::assign</methodname>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It seems OCICollection::assignElem wasn't updated.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ohh, I think that must be because of the different capitalization (assignElem vs assignelem). :/

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I created php/php-src#7405 to fix the inconsistency

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That new PR doesn't seem to add the public modifier to OCICollection::assignElem ?

Copy link
Member Author

@kocsismate kocsismate Aug 30, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No, the new PR is unrelated from <modifier>public</modifier>. It is only added because the script always generates the access modifier for methods, while OCICollection::assign() didn't have one previously.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yay for tidy-ups! Will you update this (601) PR with <modifier> for OCICollection::assignElem, Lob::truncate, getBuffering and setBuffering, and writeTemporary?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, I've just pushed all the changes. In the meanwhile, I found out why OCILob::truncate() wasn't autogenerated: c3978de#diff-1ef7c5160d41789c5faf14de56219ac73b3039795ebbac6da6ebaa716cdd8d21L12 :D It's fixed now.

@@ -80,13 +86,12 @@
&reftitle.seealso;
<para>
<simplelist>
<member><xref linkend="oci-lob.truncate" /></member>
<member><xref linkend="oci-lob.truncate"/></member>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It looks like the prototype for Lob::truncate itself hasn't been updated.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What do you miss from Lob::truncate()? It looks good for me.

<member><xref linkend="oci-lob.getbuffering" /></member>
<member><xref linkend="oci-lob.setbuffering" /></member>
<member><xref linkend="oci-lob.getbuffering"/></member>
<member><xref linkend="oci-lob.setbuffering"/></member>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The APIs for getBuffering and setBuffering don't seem to have been updated.

</methodsynopsis>
<para>
Closes descriptor of LOB or FILE. This function should be used only with
<xref linkend="oci-lob.writetemporary" />.
<xref linkend="oci-lob.writetemporary"/>.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The API for writeTemporary doesn't seem to have been updated.

<methodparam choice="opt"><type>int</type><parameter>flags</parameter><initializer><constant>OCI_FETCHSTATEMENT_BY_COLUMN</constant> + <constant>OCI_ASSOC</constant></initializer></methodparam>
<methodparam choice="opt"><type>int</type><parameter>offset</parameter><initializer>0</initializer></methodparam>
<methodparam choice="opt"><type>int</type><parameter>limit</parameter><initializer>-1</initializer></methodparam>
<methodparam choice="opt"><type>int</type><parameter>flags</parameter><initializer>0</initializer></methodparam>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think showing the default as 0 is helpful to readers

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice catch! I'll fix it in php-src as well

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Submitted php/php-src#7429

@kocsismate
Copy link
Member Author

Can I get a (hopefully) final review?

Copy link
Member

@Girgias Girgias left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Other than the minor nit in how the changelog is written (which well we're already inconsistent about so not that important), LGTM but then I don't know anything about OCI8

reference/oci8/OCI-Lob/erase.xml Outdated Show resolved Hide resolved
reference/oci8/OCI-Lob/export.xml Outdated Show resolved Hide resolved
reference/oci8/OCI-Lob/write.xml Outdated Show resolved Hide resolved
reference/oci8/functions/oci-new-collection.xml Outdated Show resolved Hide resolved
reference/oci8/functions/oci-lob-copy.xml Outdated Show resolved Hide resolved
reference/oci8/functions/oci-error.xml Outdated Show resolved Hide resolved
reference/oci8/functions/oci-connect.xml Outdated Show resolved Hide resolved
reference/oci8/OCI-Lob/writeToFile.xml Outdated Show resolved Hide resolved
reference/oci8/functions/oci-new-connect.xml Outdated Show resolved Hide resolved
@kocsismate
Copy link
Member Author

I rebased + added a new commit (964cbcd) which fixes a few minor things (+ an overloaded signature).

I'd love if I could merge this PR soon, after 4 months. :/

@cjbj
Copy link
Contributor

cjbj commented Sep 23, 2021

@cmb69 @Girgias are you OK with this? Can it be merged?

reference/oci8/functions/oci-field-name.xml Outdated Show resolved Hide resolved
reference/oci8/functions/oci-client-version.xml Outdated Show resolved Hide resolved
reference/oci8/functions/oci-field-precision.xml Outdated Show resolved Hide resolved
reference/oci8/functions/oci-field-scale.xml Outdated Show resolved Hide resolved
reference/oci8/functions/oci-field-size.xml Outdated Show resolved Hide resolved
reference/oci8/functions/oci-field-type-raw.xml Outdated Show resolved Hide resolved
reference/oci8/functions/oci-field-type.xml Outdated Show resolved Hide resolved
reference/oci8/functions/oci-num-rows.xml Outdated Show resolved Hide resolved
reference/oci8/functions/oci-password-change.xml Outdated Show resolved Hide resolved
reference/oci8/functions/oci-password-change.xml Outdated Show resolved Hide resolved
@Girgias Girgias merged commit ed6de1a into php:master Sep 23, 2021
@kocsismate
Copy link
Member Author

Thank you, @Girgias !

@kocsismate kocsismate deleted the oci8-stubs branch September 23, 2021 12:57
@cjbj
Copy link
Contributor

cjbj commented Sep 27, 2021

Thanks everyone!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants